#include <string>
#include <unordered_map>
#include <unordered_set>
#include "my_assert.h"
#include "memalloc.hpp"
#include "memalloc_impl.h"

using std::string;
using std::unordered_map;

MemAlloc *MemAlloc::pinstance_ = nullptr;

MemAlloc::MemAlloc(MemAllocImpl *pimpl):
	pimpl_(pimpl) {
	my_assert(pimpl_);
}

MemAlloc::~MemAlloc() {
	my_assert(pimpl_);
	delete pimpl_;
}

void MemAlloc::Init(uint64_t mem_size, uint64_t swap_size,
    const std::string& swap_path) {
	MemAllocImpl *pimpl_ = new MemAllocImpl(mem_size, swap_size, swap_path);
	pinstance_ = new MemAlloc(pimpl_);
}

void MemAlloc::Deinit() {
	my_assert(pinstance_);
	delete pinstance_;
}


MemAllocException::MemAllocException(ErrorCode error_code, 
    const string& error_msg) {
}

MemAllocException::~MemAllocException() noexcept {
}

const char *MemAllocException::what() const noexcept {
}

MemAllocException::ErrorCode MemAllocException::GetErrorCode() const noexcept {
}

MemAllocWaitException::MemAllocWaitException(ErrorCode error_code,
    const string& error_msg):
	MemAllocException(error_code, error_msg) {
}

MemAllocWaitException::~MemAllocWaitException() noexcept {
}

